package cn.tedu.collection;

import java.util.ArrayList;
import java.util.List;

public class ReversalDemo {
    public static void main(String[] args) {
        List<Integer> list = new ArrayList<>();
        for (int i=1;i<=6;i++){
            list.add(i);
        }
        System.out.println(list.size());
        for (int i=0;i<list.size()/2;i++){
            Integer e = list.get(i);
            System.out.println(e);
            e = list.set(list.size()-1-i,e);
            list.set(i,e);
        }
        System.out.println(list);
    }
}
